package cn.ml.gaoJi.meiJu.xingQi;

public class Test {
    public void doWhat(int day){
        if(day > 7 || day <1){
            System.out.println("输入错误，应在1-7之间！！！");
            return;
        }
        switch (day){
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
                System.out.println("工作日，要好好写代码！|");
                //break;//不加break会继续走6
            case 6:
                System.out.println("周六啦，可以看电影！");
                break;
            case 7:
                System.out.println("周日啦，可以睡个懒觉！");
                break;
        }
    }

    public void doWhat2(Week day){
        switch (day){
            case MON:
            case TUE:
            case WED:
            case THU:
            case FRI:
                System.out.println("工作日，要好好写代码！|");
                break;//不加break会继续走6
            case STA:
                System.out.println("周六啦，可以看电影！");
                break;
            case SUN:
                System.out.println("周日啦，可以睡个懒觉！");
                break;
        }
    }

    public static void main(String[] args) {
        Test t = new Test();
        t.doWhat(5);
        System.out.println("******************");
        t.doWhat2(Week.SUN);
    }



}
